import React, { Component } from 'react'

export default class App extends Component {
  handleClick = (e) => {
    console.log('执行react合成事件', e)
  }
  componentDidMount() {
    document.getElementById('btn').addEventListener('click', (e)=>{
      // e.stopPropagation()
      // e.cancelBubble = true
      console.log('执行原生事件', e)
    })
  }
  render() {
    return (
      <div>
        <button onClick={this.handleClick} id='btn'>点击按钮</button>
      </div>
    )
  }
}
